package ga;

import instrumentation.BlockClass;
import instrumentation.TrackerCoverage;

import java.util.Map;
import java.util.Set;

import mdr.MethodDependences;
import mdr.RecommendGenerator;
import model.TestClusterBuilder;

public class GAInfo {
	private Class<?> 					ClzToTest;
	private Individual[] 				population;
	private TestClusterBuilder 			TestCluster;
	private int       					generation;
	private float        				populationFitness;
	private long 						testTimeout;
	private long 						startTime;
	private int 						attempt=1;
	private Map<String, BlockClass> 	mapBlockClass;
	private Map<String,Set<Integer>> 	mapClassBranches;
	private int 						noExecution=0;
	private MethodDependences 			recommender;
	private int 						noImprovementCount=0;
	private    TrackerCoverage 			tracker;
	private 	RecommendGenerator recommendGenerator;
	public void setRecommendGenerator(RecommendGenerator recommendGenerator){
		this.recommendGenerator=recommendGenerator;
	}
	public RecommendGenerator getRecommendGenerator(){
		return this.recommendGenerator;
	}
	public void setTracker(TrackerCoverage 	tracker){
		this.tracker=tracker;
	}
	public TrackerCoverage getTracker(){
		return this.tracker;
	}
	public void setClzToTest(Class<?> ClzToTest){
		this.ClzToTest=ClzToTest;
	}
	public Class<?> getClzToTest(){
		return this.ClzToTest;
	}

	public void setMethodRelations(MethodDependences recommender){
		this.recommender=recommender;
	}
	public MethodDependences getMethodRelations(){
		return this.recommender;
	}

	
	public Individual[] getPopulation() {
		return population;
	}
	public void setPopulation(Individual[] population) {
		this.population = population;
	}
	
	public TestClusterBuilder getTestCluster() {
		return TestCluster;
	}
	public void setTestCluster(TestClusterBuilder TestCluster) {
		this.TestCluster = TestCluster;
	}
	public int getGeneration() {
		return generation;
	}
	public void setGeneration(int generation) {
		this.generation = generation;
	}
	public float getPopulationFitness() {
		return populationFitness;
	}
	public void setPopulationFitness(float populationFitness) {
		this.populationFitness = populationFitness;
	}
	public long getStartTime() {
		return startTime;
	}
	public void setStartTime(long startTime) {
		this.startTime = startTime;
	}

	public long getTestTimeOut() {
		return testTimeout;
	}
	public void setTestTimeOut(long testTimeout) {
		this.testTimeout = testTimeout;
	}
	public int getAttempt() {
		return attempt;
	}
	public void setAttempt(int attempt) {
		this.attempt = attempt;
	}
	public Map<String, BlockClass>  getmapBlockClass() {
		return mapBlockClass;
	}
	public void setMapBlockClasses(Map<String, BlockClass> 	mapBlockClass) {
		this.mapBlockClass = mapBlockClass;
	}
	public Set<Integer> getClazzBranches(String cName) {
		return mapClassBranches.get(cName);
	}
	public void setClazzBranches(Map<String, Set<Integer>> 	mapClassBranches) {
		this.mapClassBranches = mapClassBranches;
	}
	
	public int getNoExecution() {
		return noExecution;
	}
	public void setNoExecution(int noExecution) {
		this.noExecution = noExecution;
	}
	public int getNoImprovementCount() {
		return noImprovementCount;
	}
	void setNoImprovementCount(int noImprovementCount) {
		this.noImprovementCount = noImprovementCount;
	}

}
